Technical Field
Embodiments generally relate to electronic circuits and, more specifically, to a checking of the integrity of programs executed by a microprocessor.
Discussion of the Related Art
Electronic circuits, and more specifically microprocessors executing programs, are capable of undergoing disturbances (introduction of viruses or fault injection attack). They are then often equipped with integrity checking mechanisms.
A particularly common technique comprises checking whether the executed instructions correspond to the expected instructions. A signature of the program instructions is calculated on design of the program or on recording thereof in a generally non-volatile memory associated with the processing unit. Then, during the execution of the program, a current signature is calculated and compared with the pre-recorded reference signature.
Such techniques work well with programs having a set development, but raise issues as soon as the program comprises conditional jumps or variable numbers of iterations of the same calculation. Indeed, it is then particularly complicated to calculate the signature without knowing at the design stage what jumps or how many iterations will be performed.
A solution is not to take into account, in the signature calculation, possible sections (instruction, groups of instructions, sub-programs, etc.) linked to conditional jumps or to the iterations. However, the integrity of such sections is then not checked. In cryptographic applications where calculations are often performed by successive iterations and/or where the type of operation often depends on the state of a bit linked to the current iteration, this makes calculations vulnerable to possible fault-injection attacks.